{template '_header'}
<style>
	.fui-list-media img{height:1.6rem;width:1.6rem;}
</style>
<div class="fui-page order-express-page">
    <div class="fui-header">
	<div class="fui-header-left">
	    <a class="back"></a>
	</div>
	<div class="title">{if count($bundlelist)>0}包裹列表{else}物流信息{/if}</div>
	<div class="fui-header-right">&nbsp;</div>
    </div>
    <div class='fui-content'>
		{if $sendtype > 0}
		<div class="fui-list-group">
			<div class="fui-list-group-title" style="font-size:0.6rem;">包裹{$bundle}内商品</div>
		</div>
			{loop $goods $item}
			<a href="{php echo mobileUrl('goods/detail',array('id'=>$item['goodsid']))}">
				<div class="fui-list" style="padding:0.2rem 0.5rem;">
					<div class="fui-list-media back">
						<img src="{php echo tomedia($item['thumb'])}">
					</div>
					<div class="fui-list-inner" style="font-size:0.6rem;max-height:1.6rem;overflow: hidden;line-height: 0.8rem;">
						{$item['title']}
					</div>
				</div>
			</a>
			{/loop}
		{/if}
		{if count($bundlelist)>0}
		{loop $bundlelist $index $b}
		<div class="fui-list-group info-list">
				<div class="fui-list-group-title">
					<div class="fui-list" style="padding:0;border-bottom:1px solid #dcdcdc;">
						<div class="fui-list-inner">
							包裹{php echo chr($index+65)}
						</div>
						<a class="fui-list-media" href="{php echo mobileUrl('order/express',array('id'=>$b['orderid'],'sendtype'=>$b['sendtype'],'bundle'=>chr($index+65)))}"
						   style="float:right;font-size:0.6rem;color:#666;margin:0;">点击查看物流&nbsp;<span class="angle" style="font-size:1.2rem;"></span>
						</a>
					</div>
				</div>
				{loop $b['goods'] $bg}
				<a href="{php echo mobileUrl('order/express',array('id'=>$b['orderid'],'sendtype'=>$b['sendtype'],'bundle'=>chr($index+65)))}">
					<div class="fui-list">
						<div class="fui-list-media back">
							<img src="{php echo tomedia($bg['thumb'])}">
							<div class="title">{php echo count($bg['total'])}件商品</div>
						</div>
						<div class="fui-list-inner" style="font-size:0.7rem;">
							{$bg['title']}
						</div>
					</div>
				</a>
				{/loop}
		</div>
		{/loop}
		{else}
		<div class="fui-list-group info-list">
			<div class="fui-list">
				<a class="fui-list-media back">
					<img src="{php echo tomedia($goods[0]['thumb'])}">
					<div class="title">{php echo count($goods)}件商品</div>
				</a>
				<div class="fui-list-inner">
					<div class="title state">物流状态
						{if !empty($expresslist)}
						{if strexists($expresslist[0]['step'],'已签收')}
						<span class="text-danger">已签收</span></div>
					{elseif count($expresslist)<=2}
					<span class="text-primary">备货中</span></div>
				{else}
				<span class="text-success">配送中</span></div>
			{/if}
			{/if}
			<div class="text expcom">
				<p>快递公司：{$order['expresscom']}</p>
				<p>快递单号：{$order['expresssn']}</p>
			</div>
		</div>
		{/if}
	</div>
    </div>
    
	{if empty($expresslist) && empty($bundlelist)}
	<div class='content-empty'>
	    <i class='icon icon-deliver1'></i><br/><span class='text'>暂时没有物流信息</span>
	</div>
	{else}
	<div class="fui-list-group express-list" style="margin-top: 0.5rem;">
	{loop $expresslist $k $ex}
	    	<div class="fui-list {if $k==0}current{/if}">
	    		<div class="fui-list-inner">
			    <div class="text step">{$ex['step']}</div>
	    		    <div class="text time">{$ex['time']}</div>
	    		</div>
	    	</div>
                    {/loop}
	    </div>
	{/if}
	
    
         </div>
</div>
{template '_footer'}